<?php
//调用类
include "DB.class.php";
//实例化redis
$redis = new Redis();
$redis->connect('127.0.0.1',6379);
//接收当前页
$page = isset($_GET['page'])?$_GET['page']:1;
$size = $_GET['limit'];

//接收数据
$data = [];
if(isset($_GET['name']) && $_GET['name'] != ''){
    $data['name'] = $_GET['name'];
}
//实例化
$db = new DB();
//调用方法
$res = $db->getShow('goods',$data,$page,$size);
//返回值
echo $res;
?>